package cn.wsn2018.tools.util;


public class Regex {
    public static String checkReg(String str){
        str = str.replaceAll("<", "& lt;").replaceAll(">", "& gt;");
        str = str.replaceAll("\\(", "& #40;").replaceAll("\\)", "& #41;");
        str = str.replaceAll("'", "& #39;");
        str = str.replaceAll("eval\\((.*)\\)", "");
        str = str.replaceAll("[\\\"\\\'][\\s]*javascript:(.*)[\\\"\\\']", "\"\"");
        str = str.replaceAll("script", "");
        return str;
    }


}
